package org.zhxy.entity.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

@Getter
@Setter
@NoArgsConstructor
@TableName("pe_permission")
public class Permission implements Serializable {

    @TableId(type = IdType.ID_WORKER_STR)
    private String id;

    private String name;

    private Integer type; //权限类型 1为菜单 2为功能 3为API

    private String code;

    private String pid;

    private String classification; // 1 顶级菜单  2中级菜单 3底层菜单 4按钮 5API


    private transient List<Permission> children;


    public Permission(String name, Integer type, String code) {
        this.name = name;
        this.type = type;
        this.code = code;
    }

}